<template>
    <AModal v-model="visible" title="代码" :footer="null">
        <div class="container">
            <pre v-html="source"></pre>
        </div>
        <ARow style="margin-top: 20px" type="flex" justify="center">
            <ASpace>
                <AButton type="primary">复制代码</AButton>
                <AButton type="primary">下载代码</AButton>
            </ASpace>
        </ARow>
    </AModal>
</template>

<script>
export default {
    name: "GenerateCode",
    data() {
        return {
            visible: false,
            fields: [],
            source: "",
        };
    },
    methods: {
        showModel(arr) {
            this.visible = true;
            this.fields = arr;

        },
    },
};
</script>

<style></style>
